{extend name='admin@main'}

{block name="content"}
<div class="think-box-shadow">
    {include file='cleaner_withdrawal/index_search'}
    <table class="layui-table margin-top-10" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='text-left nowrap'>用户信息</th>
            <th class='text-left nowrap'>提现信息</th>
            <th class='text-left nowrap'>状态</th>
            <th class='text-left nowrap'></th>
            <th></th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}
        <tr data-dbclick>
            <td class='text-left nowrap'>
                {notempty name='vo.cleaner.work_headimg'}
                <img data-tips-image style="width:40px;height:40px;vertical-align:top" src="{$vo.cleaner.work_headimg|default=''}" class="margin-right-5">
                {/notempty}
                <div class="inline-block">
                    会员姓名：{$vo.cleaner.name|default='--'}<br>
                    会员手机：{$vo.cleaner.phone|default='--'}<br>
                </div>
            </td>
            <td class='text-left nowrap'>
                <div class="inline-block">
                    提现金额：<span class="color-blue">{$vo.amount|default='--'}</span><br>
                    银行卡号：{$vo.bank.card_no|default='--'}<br>
                    银行名称：{$vo.bank.bank_name|default='--'}<br>
                    开户支行：{$vo.bank.bank_open_branch_name|default='--'}<br>
                </div>
            </td>
            <td class='text-left nowrap'>
                审核状态：{if $vo.status eq 1}<strong class="color-green">已通过</strong>{elseif $vo.status eq 0}<strong class="color-desc">待审核</strong>{else}<strong class="color-red">审核失败</strong>{/if}<br>
                打款状态：{if $vo.pay_state eq 1}<strong class="color-green">已打款</strong>{elseif $vo.pay_state eq 0}<strong class="color-desc">未打款</strong>{/if}
            </td>
            <td class='text-left'>{$vo.create_at}</td>
            <td class="text-left">
                {if $vo.status eq 0}
                    {if auth("currency/cleaner_withdrawal/resume")}
                    <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('resume')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('currency/cleaner_withdrawal/resume')}">通 过</a>
                    {/if}
                    {if auth("currency/cleaner_withdrawal/forbid")}
                    <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('forbid')}" data-value="id#{$vo.id};status#-1" data-csrf="{:systoken('currency/cleaner_withdrawal/forbid')}">驳 回</a>
                    {/if}
                {else}
                    {if $vo.pay_state eq 0 and auth("currency/cleaner_withdrawal/save")}
                    <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('save')}" data-value="id#{$vo.id};pay_state#1" data-csrf="{:systoken('currency/cleaner_withdrawal/save')}">打 款</a>
                    {/if}
                {/if}
            </td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}